import pdfplumber
with pdfplumber.open("C:/Users/lenovo/Desktop/讨论/2.1.pdf") as f:
    for page in f.pages:  #
        print(page.extract_text())# 提取内容
        print(f"---------------------------这是第{page.page_number}页-----------------------------------")